/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.shiep.aurora.calendar;

/**
 *
 * @author Eric
 */
public class BackGround extends javax.swing.JPanel {

    /**
     * Creates new form BackGround
     */
    public BackGround() {
        /**
         * 放置日历
         */
        dates = new DatePanel[6][7];
        for (int i = 0; i < dates.length; i++) {
            for (int j = 0; j < dates[i].length; j++) {
                dates[i][j] = new DatePanel(this);
            }
        }
        initComponents();
        this.setBounds(100, 50, 470, 520);
    }
    CalendarFrameAdapter frameControl;

    public void IOC(CalendarFrameAdapter frameControl) {
        this.frameControl = frameControl;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        schedulePanel = new javax.swing.JPanel();
        schedule1 = new javax.swing.JLabel();
        schedule2 = new javax.swing.JLabel();
        schedule3 = new javax.swing.JLabel();
        schedule4 = new javax.swing.JLabel();
        schedule5 = new javax.swing.JLabel();
        noScheduleJLabel = new javax.swing.JLabel();
        calendarPanel = new javax.swing.JPanel();
        yearAndMonthPanel = new javax.swing.JPanel();
        solarCalendarYearAndMonthJLabel = new javax.swing.JLabel();
        lunarCalendarYearAndMonthJLabel = new javax.swing.JLabel();
        downMonthJLabelButton = new javax.swing.JLabel();
        upMonthJLabelButton = new javax.swing.JLabel();
        dayPanel = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        sundayBlockJLabel1 = new javax.swing.JLabel();
        mondayBlockJLabel = new javax.swing.JLabel();
        tuesdayBlockJLabel = new javax.swing.JLabel();
        wednesdayBlockJLabel = new javax.swing.JLabel();
        thursdayBlockJLabel = new javax.swing.JLabel();
        fridayBlockJLabel = new javax.swing.JLabel();
        saturdayBlockJLabel = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jPanel1 = dates[0][0];
        jPanel2 = dates[0][1];
        jPanel3 =  dates[0][2];
        jPanel4 =  dates[0][3];
        jPanel5 =  dates[0][4];
        jPanel6 =  dates[0][5];
        jPanel7 =  dates[0][6];
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jPanel8 =  dates[1][0];
        jPanel9 = dates[1][1];
        jPanel10 = dates[1][2];
        jPanel11 = dates[1][3];
        jPanel12 = dates[1][4];
        jPanel13 = dates[1][5];
        jPanel14 = dates[1][6];
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jPanel15 = dates[2][0];
        jPanel16 = dates[2][1];
        jPanel17 = dates[2][2];
        jPanel18 = dates[2][3];
        jPanel19 = dates[2][4];
        jPanel20 = dates[2][5];
        jPanel21 = dates[2][6];
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jPanel22 = dates[3][0];
        jPanel23 = dates[3][1];
        jPanel24 = dates[3][2];
        jPanel25 = dates[3][3];
        jPanel26 = dates[3][4];
        jPanel27 = dates[3][5];
        jPanel28 = dates[3][6];
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jPanel29 = dates[4][0];
        jPanel30 = dates[4][1];
        jPanel31 = dates[4][2];
        jPanel32 = dates[4][3];
        jPanel33 = dates[4][4];
        jPanel34 = dates[4][5];
        jPanel35 = dates[4][6];
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jPanel36 = dates[5][0];
        jPanel37 =  dates[5][1];
        jPanel38 =  dates[5][2];
        jPanel39 =  dates[5][3];
        jPanel40 =  dates[5][4];
        jPanel41 =  dates[5][5];
        jPanel42 =  dates[5][6];
        backGround = new javax.swing.JLabel();

        setMaximumSize(new java.awt.Dimension(470, 520));
        setOpaque(false);
        setPreferredSize(new java.awt.Dimension(470, 520));
        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        schedulePanel.setOpaque(false);
        schedulePanel.setLayout(new java.awt.GridLayout(5, 0));

        schedule1.setFont(new java.awt.Font("微软雅黑", 0, 15)); // NOI18N
        schedule1.setForeground(new java.awt.Color(255, 102, 0));
        schedule1.setText("19:35  中山公园");
        schedule1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                schedule1MouseClicked(evt);
            }
        });
        schedulePanel.add(schedule1);

        schedule2.setFont(new java.awt.Font("微软雅黑", 0, 15)); // NOI18N
        schedule2.setForeground(new java.awt.Color(180, 102, 0));
        schedule2.setText("事件1");
        schedulePanel.add(schedule2);

        schedule3.setFont(new java.awt.Font("微软雅黑", 0, 15)); // NOI18N
        schedule3.setForeground(new java.awt.Color(120, 102, 0));
        schedule3.setText("事件1");
        schedulePanel.add(schedule3);

        schedule4.setFont(new java.awt.Font("微软雅黑", 0, 15)); // NOI18N
        schedule4.setForeground(new java.awt.Color(60, 102, 0));
        schedule4.setText("事件1");
        schedulePanel.add(schedule4);

        schedule5.setFont(new java.awt.Font("微软雅黑", 0, 15)); // NOI18N
        schedule5.setForeground(new java.awt.Color(0, 102, 0));
        schedule5.setText("事件1");
        schedulePanel.add(schedule5);

        add(schedulePanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 20, 360, 110));

        noScheduleJLabel.setFont(new java.awt.Font("微软雅黑", 1, 33)); // NOI18N
        noScheduleJLabel.setForeground(new java.awt.Color(204, 204, 204));
        noScheduleJLabel.setText("没有新的日程");
        add(noScheduleJLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 50, 220, 50));

        calendarPanel.setOpaque(false);
        calendarPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        yearAndMonthPanel.setFocusable(false);
        yearAndMonthPanel.setOpaque(false);
        yearAndMonthPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        solarCalendarYearAndMonthJLabel.setFont(new java.awt.Font("黑体", 1, 18)); // NOI18N
        solarCalendarYearAndMonthJLabel.setForeground(new java.awt.Color(255, 255, 255));
        solarCalendarYearAndMonthJLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        solarCalendarYearAndMonthJLabel.setText("2012年10月");
        solarCalendarYearAndMonthJLabel.setFocusable(false);
        solarCalendarYearAndMonthJLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                solarCalendarYearAndMonthJLabelMouseClicked(evt);
            }
        });
        yearAndMonthPanel.add(solarCalendarYearAndMonthJLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 10, -1, 18));

        lunarCalendarYearAndMonthJLabel.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        lunarCalendarYearAndMonthJLabel.setForeground(new java.awt.Color(255, 255, 255));
        lunarCalendarYearAndMonthJLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lunarCalendarYearAndMonthJLabel.setText("壬辰年虎己酉月");
        lunarCalendarYearAndMonthJLabel.setFocusable(false);
        yearAndMonthPanel.add(lunarCalendarYearAndMonthJLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 30, -1, -1));

        downMonthJLabelButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        downMonthJLabelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/shiep/aurora/calendar/resources/downArrow.png"))); // NOI18N
        downMonthJLabelButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                downMonthJLabelButtonMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                downMonthJLabelButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                downMonthJLabelButtonMouseReleased(evt);
            }
        });
        yearAndMonthPanel.add(downMonthJLabelButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 10, -1, -1));

        upMonthJLabelButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        upMonthJLabelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/shiep/aurora/calendar/resources/upArrow.png"))); // NOI18N
        upMonthJLabelButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                upMonthJLabelButtonMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                upMonthJLabelButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                upMonthJLabelButtonMouseReleased(evt);
            }
        });
        yearAndMonthPanel.add(upMonthJLabelButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 10, -1, -1));

        calendarPanel.add(yearAndMonthPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 450, 50));

        dayPanel.setFocusable(false);
        dayPanel.setMaximumSize(new java.awt.Dimension(450, 300));
        dayPanel.setMinimumSize(new java.awt.Dimension(400, 300));
        dayPanel.setOpaque(false);
        dayPanel.setPreferredSize(new java.awt.Dimension(450, 300));
        dayPanel.setLayout(new java.awt.GridLayout(7, 9));

        jLabel1.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel1.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel1.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel1);

        sundayBlockJLabel1.setFont(new java.awt.Font("微软雅黑", 1, 18)); // NOI18N
        sundayBlockJLabel1.setForeground(new java.awt.Color(255, 102, 0));
        sundayBlockJLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        sundayBlockJLabel1.setText("周日");
        sundayBlockJLabel1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        sundayBlockJLabel1.setFocusable(false);
        sundayBlockJLabel1.setMaximumSize(new java.awt.Dimension(50, 30));
        sundayBlockJLabel1.setMinimumSize(new java.awt.Dimension(50, 30));
        sundayBlockJLabel1.setPreferredSize(new java.awt.Dimension(50, 30));
        dayPanel.add(sundayBlockJLabel1);

        mondayBlockJLabel.setFont(new java.awt.Font("微软雅黑", 1, 18)); // NOI18N
        mondayBlockJLabel.setForeground(new java.awt.Color(102, 102, 255));
        mondayBlockJLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        mondayBlockJLabel.setText("周一");
        mondayBlockJLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        mondayBlockJLabel.setFocusable(false);
        mondayBlockJLabel.setMaximumSize(new java.awt.Dimension(50, 30));
        mondayBlockJLabel.setMinimumSize(new java.awt.Dimension(50, 30));
        mondayBlockJLabel.setPreferredSize(new java.awt.Dimension(50, 30));
        dayPanel.add(mondayBlockJLabel);

        tuesdayBlockJLabel.setFont(new java.awt.Font("微软雅黑", 1, 18)); // NOI18N
        tuesdayBlockJLabel.setForeground(new java.awt.Color(102, 102, 255));
        tuesdayBlockJLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tuesdayBlockJLabel.setText("周二");
        tuesdayBlockJLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tuesdayBlockJLabel.setFocusable(false);
        tuesdayBlockJLabel.setMaximumSize(new java.awt.Dimension(50, 30));
        tuesdayBlockJLabel.setMinimumSize(new java.awt.Dimension(50, 30));
        tuesdayBlockJLabel.setPreferredSize(new java.awt.Dimension(50, 30));
        dayPanel.add(tuesdayBlockJLabel);

        wednesdayBlockJLabel.setFont(new java.awt.Font("微软雅黑", 1, 18)); // NOI18N
        wednesdayBlockJLabel.setForeground(new java.awt.Color(102, 102, 255));
        wednesdayBlockJLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        wednesdayBlockJLabel.setText("周三");
        wednesdayBlockJLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        wednesdayBlockJLabel.setFocusable(false);
        wednesdayBlockJLabel.setMaximumSize(new java.awt.Dimension(50, 30));
        wednesdayBlockJLabel.setMinimumSize(new java.awt.Dimension(50, 30));
        wednesdayBlockJLabel.setPreferredSize(new java.awt.Dimension(50, 30));
        dayPanel.add(wednesdayBlockJLabel);

        thursdayBlockJLabel.setFont(new java.awt.Font("微软雅黑", 1, 18)); // NOI18N
        thursdayBlockJLabel.setForeground(new java.awt.Color(102, 102, 255));
        thursdayBlockJLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        thursdayBlockJLabel.setText("周四");
        thursdayBlockJLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        thursdayBlockJLabel.setFocusable(false);
        thursdayBlockJLabel.setMaximumSize(new java.awt.Dimension(50, 30));
        thursdayBlockJLabel.setMinimumSize(new java.awt.Dimension(50, 30));
        thursdayBlockJLabel.setPreferredSize(new java.awt.Dimension(50, 30));
        dayPanel.add(thursdayBlockJLabel);

        fridayBlockJLabel.setFont(new java.awt.Font("微软雅黑", 1, 18)); // NOI18N
        fridayBlockJLabel.setForeground(new java.awt.Color(102, 102, 255));
        fridayBlockJLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        fridayBlockJLabel.setText("周五");
        fridayBlockJLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        fridayBlockJLabel.setFocusable(false);
        fridayBlockJLabel.setMaximumSize(new java.awt.Dimension(50, 30));
        fridayBlockJLabel.setMinimumSize(new java.awt.Dimension(50, 30));
        fridayBlockJLabel.setPreferredSize(new java.awt.Dimension(50, 30));
        dayPanel.add(fridayBlockJLabel);

        saturdayBlockJLabel.setFont(new java.awt.Font("微软雅黑", 1, 18)); // NOI18N
        saturdayBlockJLabel.setForeground(new java.awt.Color(255, 102, 0));
        saturdayBlockJLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        saturdayBlockJLabel.setText("周六");
        saturdayBlockJLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        saturdayBlockJLabel.setFocusable(false);
        saturdayBlockJLabel.setMaximumSize(new java.awt.Dimension(50, 30));
        saturdayBlockJLabel.setMinimumSize(new java.awt.Dimension(50, 30));
        saturdayBlockJLabel.setPreferredSize(new java.awt.Dimension(50, 30));
        dayPanel.add(saturdayBlockJLabel);

        jLabel2.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel2.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel2.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel2);

        jLabel3.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel3.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel3.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel3);

        jPanel1.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel1.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel1.setOpaque(false);
        jPanel1.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel1);

        jPanel2.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel2.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel2.setOpaque(false);
        jPanel2.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel2);

        jPanel3.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel3.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel3.setOpaque(false);
        jPanel3.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel3);

        jPanel4.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel4.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel4.setOpaque(false);
        jPanel4.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel4);

        jPanel5.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel5.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel5.setOpaque(false);
        jPanel5.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel5);

        jPanel6.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel6.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel6.setOpaque(false);
        jPanel6.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel6);

        jPanel7.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel7.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel7.setOpaque(false);
        jPanel7.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel7);

        jLabel17.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel17.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel17.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel17);

        jLabel18.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel18.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel18.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel18);

        jPanel8.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel8.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel8.setOpaque(false);
        jPanel8.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel8);

        jPanel9.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel9.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel9.setOpaque(false);
        jPanel9.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel9);

        jPanel10.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel10.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel10.setOpaque(false);
        jPanel10.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel10);

        jPanel11.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel11.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel11.setOpaque(false);
        jPanel11.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel11);

        jPanel12.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel12.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel12.setOpaque(false);
        jPanel12.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel12);

        jPanel13.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel13.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel13.setOpaque(false);
        jPanel13.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel13);

        jPanel14.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel14.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel14.setOpaque(false);
        jPanel14.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel14);

        jLabel26.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel26.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel26.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel26);

        jLabel27.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel27.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel27.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel27);

        jPanel15.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel15.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel15.setOpaque(false);
        jPanel15.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel15);

        jPanel16.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel16.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel16.setOpaque(false);
        jPanel16.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel16);

        jPanel17.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel17.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel17.setOpaque(false);
        jPanel17.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel17);

        jPanel18.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel18.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel18.setOpaque(false);
        jPanel18.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel18);

        jPanel19.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel19.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel19.setOpaque(false);
        jPanel19.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel19);

        jPanel20.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel20.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel20.setOpaque(false);
        jPanel20.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel20);

        jPanel21.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel21.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel21.setOpaque(false);
        jPanel21.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel21);

        jLabel28.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel28.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel28.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel28);

        jLabel29.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel29.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel29.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel29);

        jPanel22.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel22.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel22.setOpaque(false);
        jPanel22.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel22);

        jPanel23.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel23.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel23.setOpaque(false);
        jPanel23.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel23);

        jPanel24.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel24.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel24.setOpaque(false);
        jPanel24.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel24);

        jPanel25.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel25.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel25.setOpaque(false);
        jPanel25.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel25);

        jPanel26.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel26.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel26.setOpaque(false);
        jPanel26.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel26);

        jPanel27.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel27.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel27.setOpaque(false);
        jPanel27.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel27);

        jPanel28.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel28.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel28.setOpaque(false);
        jPanel28.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel28);

        jLabel37.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel37.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel37.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel37);

        jLabel38.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel38.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel38.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel38);

        jPanel29.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel29.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel29.setOpaque(false);
        jPanel29.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel29);

        jPanel30.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel30.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel30.setOpaque(false);
        jPanel30.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel30);

        jPanel31.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel31.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel31.setOpaque(false);
        jPanel31.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel31);

        jPanel32.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel32.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel32.setOpaque(false);
        jPanel32.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel32);

        jPanel33.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel33.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel33.setOpaque(false);
        jPanel33.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel33);

        jPanel34.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel34.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel34.setOpaque(false);
        jPanel34.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel34);

        jPanel35.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel35.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel35.setOpaque(false);
        jPanel35.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel35);

        jLabel39.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel39.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel39.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel39);

        jLabel40.setMaximumSize(new java.awt.Dimension(50, 45));
        jLabel40.setMinimumSize(new java.awt.Dimension(50, 45));
        jLabel40.setPreferredSize(new java.awt.Dimension(50, 45));
        dayPanel.add(jLabel40);

        jPanel36.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel36.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel36.setOpaque(false);
        jPanel36.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel36);

        jPanel37.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel37.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel37.setOpaque(false);
        jPanel37.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel37);

        jPanel38.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel38.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel38.setOpaque(false);
        jPanel38.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel38);

        jPanel39.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel39.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel39.setOpaque(false);
        jPanel39.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel39);

        jPanel40.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel40.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel40.setOpaque(false);
        jPanel40.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel40);

        jPanel41.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel41.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel41.setOpaque(false);
        jPanel41.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel41);

        jPanel42.setMaximumSize(new java.awt.Dimension(52, 43));
        jPanel42.setMinimumSize(new java.awt.Dimension(52, 43));
        jPanel42.setOpaque(false);
        jPanel42.setPreferredSize(new java.awt.Dimension(52, 43));
        dayPanel.add(jPanel42);

        calendarPanel.add(dayPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 50, 450, 290));

        add(calendarPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 155, 450, 350));

        backGround.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/shiep/aurora/calendar/resources/background1.png"))); // NOI18N
        backGround.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                backGroundMouseClicked(evt);
            }
        });
        add(backGround, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 0, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    private void backGroundMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_backGroundMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_backGroundMouseClicked

    private void downMonthJLabelButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_downMonthJLabelButtonMousePressed
        downMonthJLabelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/shiep/aurora/calendar/resources/downArrowPressed.png")));
    }//GEN-LAST:event_downMonthJLabelButtonMousePressed

    private void downMonthJLabelButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_downMonthJLabelButtonMouseReleased
        downMonthJLabelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/shiep/aurora/calendar/resources/downArrow.png")));
    }//GEN-LAST:event_downMonthJLabelButtonMouseReleased

    private void downMonthJLabelButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_downMonthJLabelButtonMouseClicked
        frameControl.setCalendarNextMonth();
    }//GEN-LAST:event_downMonthJLabelButtonMouseClicked

    private void upMonthJLabelButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_upMonthJLabelButtonMousePressed
        upMonthJLabelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/shiep/aurora/calendar/resources/upArrowPressed.png"))); // NOI18N
    }//GEN-LAST:event_upMonthJLabelButtonMousePressed

    private void upMonthJLabelButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_upMonthJLabelButtonMouseReleased
        upMonthJLabelButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/shiep/aurora/calendar/resources/upArrow.png"))); // NOI18N
    }//GEN-LAST:event_upMonthJLabelButtonMouseReleased

    private void upMonthJLabelButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_upMonthJLabelButtonMouseClicked
        frameControl.setCalendarLastMonth();
    }//GEN-LAST:event_upMonthJLabelButtonMouseClicked

    private void solarCalendarYearAndMonthJLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_solarCalendarYearAndMonthJLabelMouseClicked
        frameControl.setCalendarPresentTime();
    }//GEN-LAST:event_solarCalendarYearAndMonthJLabelMouseClicked

    private void schedule1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_schedule1MouseClicked
        int index = -1;
        if (evt.getSource() == schedule1) {
            index = 0;
        }
        if (evt.getSource() == schedule2) {
            index = 1;
        }
        if (evt.getSource() == schedule3) {
            index = 2;
        }
        if (evt.getSource() == schedule4) {
            index = 3;
        }
        if (evt.getSource() == schedule5) {
            index = 4;
        }
        if (evt.getClickCount() >= 2) {
            if (index != -1) {
                UIManager.getSchedulePanel().setContent(frameControl.getShowingScheduleModel(index), SchedulePanel.State.Change);
                 UIManager.getSchedulePanel().setVisible(true);
            }
        }
        if (evt.getClickCount() >= 1) {
            if (index != -1) {
                UIManager.getSchedulePanel().setContent(frameControl.getShowingScheduleModel(index), SchedulePanel.State.Read);
                  UIManager.getSchedulePanel().setVisible(true);
            }
        }
    }//GEN-LAST:event_schedule1MouseClicked
    javax.swing.JLabel schedules[] = new javax.swing.JLabel[5];
    DatePanel dates[][];
    // Variables declaration - do not modify//GEN-BEGIN:variables
    javax.swing.JLabel backGround;
    javax.swing.JPanel calendarPanel;
    /**
    * 日历面板，即是一个9*6大小的版
    * 一  二  三  四  五  六  七
    1   2   3   4   5
    6   7   8   9   10  11  12
    13  14  15  16  17  18  19
    20  21  22  23  24  25  26
    27  28  29  30  31
    */
    javax.swing.JPanel dayPanel;
    javax.swing.JLabel downMonthJLabelButton;
    javax.swing.JLabel fridayBlockJLabel;
    javax.swing.JLabel jLabel1;
    javax.swing.JLabel jLabel17;
    javax.swing.JLabel jLabel18;
    javax.swing.JLabel jLabel2;
    javax.swing.JLabel jLabel26;
    javax.swing.JLabel jLabel27;
    javax.swing.JLabel jLabel28;
    javax.swing.JLabel jLabel29;
    javax.swing.JLabel jLabel3;
    javax.swing.JLabel jLabel37;
    javax.swing.JLabel jLabel38;
    javax.swing.JLabel jLabel39;
    javax.swing.JLabel jLabel40;
    javax.swing.JPanel jPanel1;
    javax.swing.JPanel jPanel10;
    javax.swing.JPanel jPanel11;
    javax.swing.JPanel jPanel12;
    javax.swing.JPanel jPanel13;
    javax.swing.JPanel jPanel14;
    javax.swing.JPanel jPanel15;
    javax.swing.JPanel jPanel16;
    javax.swing.JPanel jPanel17;
    javax.swing.JPanel jPanel18;
    javax.swing.JPanel jPanel19;
    javax.swing.JPanel jPanel2;
    javax.swing.JPanel jPanel20;
    javax.swing.JPanel jPanel21;
    javax.swing.JPanel jPanel22;
    javax.swing.JPanel jPanel23;
    javax.swing.JPanel jPanel24;
    javax.swing.JPanel jPanel25;
    javax.swing.JPanel jPanel26;
    javax.swing.JPanel jPanel27;
    javax.swing.JPanel jPanel28;
    javax.swing.JPanel jPanel29;
    javax.swing.JPanel jPanel3;
    javax.swing.JPanel jPanel30;
    javax.swing.JPanel jPanel31;
    javax.swing.JPanel jPanel32;
    javax.swing.JPanel jPanel33;
    javax.swing.JPanel jPanel34;
    javax.swing.JPanel jPanel35;
    javax.swing.JPanel jPanel36;
    javax.swing.JPanel jPanel37;
    javax.swing.JPanel jPanel38;
    javax.swing.JPanel jPanel39;
    javax.swing.JPanel jPanel4;
    javax.swing.JPanel jPanel40;
    javax.swing.JPanel jPanel41;
    javax.swing.JPanel jPanel42;
    javax.swing.JPanel jPanel5;
    javax.swing.JPanel jPanel6;
    javax.swing.JPanel jPanel7;
    javax.swing.JPanel jPanel8;
    javax.swing.JPanel jPanel9;
    javax.swing.JLabel lunarCalendarYearAndMonthJLabel;
    javax.swing.JLabel mondayBlockJLabel;
    javax.swing.JLabel noScheduleJLabel;
    javax.swing.JLabel saturdayBlockJLabel;
    javax.swing.JLabel schedule1;
    javax.swing.JLabel schedule2;
    javax.swing.JLabel schedule3;
    javax.swing.JLabel schedule4;
    javax.swing.JLabel schedule5;
    javax.swing.JPanel schedulePanel;
    /**
    * 日历中的阳历年月，默认是2012年10月
    */
    javax.swing.JLabel solarCalendarYearAndMonthJLabel;
    javax.swing.JLabel sundayBlockJLabel1;
    javax.swing.JLabel thursdayBlockJLabel;
    javax.swing.JLabel tuesdayBlockJLabel;
    javax.swing.JLabel upMonthJLabelButton;
    javax.swing.JLabel wednesdayBlockJLabel;
    javax.swing.JPanel yearAndMonthPanel;
    // End of variables declaration//GEN-END:variables
}
